package com.masterrabbit.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.masterrabbit.mapper.MerchantReviewsMapper;
import com.masterrabbit.domain.MerchantReviews;
import com.masterrabbit.service.IMerchantReviewsService;

/**
 * 商户信息审核Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-19
 */
@Service
public class MerchantReviewsServiceImpl implements IMerchantReviewsService 
{
    @Autowired
    private MerchantReviewsMapper merchantReviewsMapper;

    /**
     * 查询商户信息审核
     * 
     * @param reviewId 商户信息审核主键
     * @return 商户信息审核
     */
    @Override
    public MerchantReviews selectMerchantReviewsByReviewId(Long reviewId)
    {
        return merchantReviewsMapper.selectMerchantReviewsByReviewId(reviewId);
    }

    /**
     * 查询商户信息审核列表
     * 
     * @param merchantReviews 商户信息审核
     * @return 商户信息审核
     */
    @Override
    public List<MerchantReviews> selectMerchantReviewsList(MerchantReviews merchantReviews)
    {
        return merchantReviewsMapper.selectMerchantReviewsList(merchantReviews);
    }

    /**
     * 新增商户信息审核
     * 
     * @param merchantReviews 商户信息审核
     * @return 结果
     */
    @Override
    public int insertMerchantReviews(MerchantReviews merchantReviews)
    {
        return merchantReviewsMapper.insertMerchantReviews(merchantReviews);
    }

    /**
     * 修改商户信息审核
     * 
     * @param merchantReviews 商户信息审核
     * @return 结果
     */
    @Override
    public int updateMerchantReviews(MerchantReviews merchantReviews)
    {
        return merchantReviewsMapper.updateMerchantReviews(merchantReviews);
    }

    /**
     * 批量删除商户信息审核
     * 
     * @param reviewIds 需要删除的商户信息审核主键
     * @return 结果
     */
    @Override
    public int deleteMerchantReviewsByReviewIds(Long[] reviewIds)
    {
        return merchantReviewsMapper.deleteMerchantReviewsByReviewIds(reviewIds);
    }

    /**
     * 删除商户信息审核信息
     * 
     * @param reviewId 商户信息审核主键
     * @return 结果
     */
    @Override
    public int deleteMerchantReviewsByReviewId(Long reviewId)
    {
        return merchantReviewsMapper.deleteMerchantReviewsByReviewId(reviewId);
    }

    @Override
    public String getuaerName(int userId) {
        return merchantReviewsMapper.getuserName(userId);
    }


}
